package cate.common.table.pvp.pointrace.sheet;

import cate.common.table.ESheet;
import cate.common.table.pvp.pointrace.row.PointRaceRewardDayRow;

/**
 * 演武场每日奖励
 */
public class PointRaceRewardDaySheet extends ESheet<PointRaceRewardDayRow> {

    @Override
    public String getSheetName() {
        return "积分赛每日奖励";
    }

    @Override
    protected PointRaceRewardDayRow buildRow() {
        return new PointRaceRewardDayRow();
    }

    public String getReward(int rankNo) {
        for (PointRaceRewardDayRow row : list) {
            if ((row.end == 0 && rankNo >= row.begin)
                    || (rankNo >= row.begin && rankNo <= row.end)) {
                return row.rewardStr;
            }
        }
        return null;
    }
}
